// Sun.cpp: implementation of the Sun class.
//
//////////////////////////////////////////////////////////////////////

#include "Sun.h"

/* PLIB includes */
#include <plib/ssg.h>
#include <plib/ssgAux.h>
#include <plib/ssgaSky.h>

/* Project classes includes*/
#include "Defines.h"
#include "Sky.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Sun::Sun(ssgaSky *sky)
{
this->bodyNameList[0] = "Sun";
this->bodyNameList[1] = NULL;

/* sun */
this->sun =  sky -> addBody (
                  "./SkyObjects/Sun/data/halo.rgba",	        // body texture
				  NULL,							// halo texture
				  SUN_SIZE,						// size
				  SUN_DISTANCE,				    // distance
				  true);						// is sun - dome painted 
												// based on this  
this->sun -> setDeclination  ( SUN_DECLINATION*SGD_DEGREES_TO_RADIANS );
this->sun -> setRightAscension (SUN_RIGHT_ASCENSION*SGD_DEGREES_TO_RADIANS );

}

Sun::~Sun()
{

}

double Sun::getSolAngle()
{
	return this->sun->getAngle();
}